/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <joerg@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.        Joerg Wunsch
 * ----------------------------------------------------------------------------
 *
 * IO feature compatibility definitions for various AVRs.
 *
 * $Id: iocompat.h,v 1.6.2.1 2008/03/17 22:08:46 joerg_wunsch Exp $
 */

// NOTE: This file has been adapted to better suit our project (i.e. ATTiny85)
//       as well as a few style changes.  The license has been retained and the
//       original file can be obtained from:
//       http://www.nongnu.org/avr-libc/user-manual/group__demo__project.html

#ifndef IOCOMPAT_H
#define IOCOMPAT_H

// ATTiny Device-sepcific Definition Used in the LED Stairs Project
/* Timer 1 is only an 8-bit timer on these devices. */
#define DDROC DDRB
#define OCR OCR1A
#define TIMER1_TOP 255  /* only 8-bit PWM possible */
#define TIMER1_PWM_INIT _BV(PWM1A) | _BV(COM1A1)
#define TIMER1_CLOCKSOURCE _BV(CS12) /* use 1/8 prescaler */

#endif // IOCOMPAT_H defined
